/*******************************************************************************
 * Copyright (c) 2011 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package com.takaharabooks.mhp3rd;

import android.content.Context;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.database.Cursor;
import android.database.SQLException;

public class DB_WeakPointGallery extends DB_Base
{
	//**********************定数定義**********************
	//***** 数値
	// Version
	// 2011/05/21	Ver.33
	// 2011/05/23	Ver.34
	// 2011/06/01	Ver.36
	public static final int DB_VER = 36;
	//***** 文字列
	// DB名
	public static final String	DB_NAME = "WeekPoint.db";
	// テーブル名
	public static final String	DB_TBL_NAME = "tb_weakpoint";
	public static final String	DB_USER_TBL_NAME = "tb_user";
	public static final String	DB_KIND_TBL_NAME = "tb_monster_kind";
	public static final String	DB_WRITER_TBL_NAME = "tb_writer";
	public static final String	DB_MONSTER_TBL_NAME = "tb_monster";
	// View名
	public static final String	DB_VIEW_NAME = "vw_weakpoint";
	// 列名
	public static final String	DB_COL_WEAKPOINT_ID = "weakpoint_id";
	public static final String	DB_COL_WEAKPOINT_IMG_NAME = "image_name";
	public static final String	DB_COL_WEAKPOINT_MONS_NAME = "monster_name";
	public static final String	DB_COL_WEAKPOINT_MONS_WEAK = "weak_point";
	public static final String	DB_COL_WEAKPOINT_MONS_KIND = "monster_kind";
	public static final String	DB_COL_WEAKPOINT_WP_FIRE = "weakpoint_fire";
	public static final String	DB_COL_WEAKPOINT_WP_WATER = "weakpoint_water";
	public static final String	DB_COL_WEAKPOINT_WP_THUNDER = "weakpoint_Thunder";
	public static final String	DB_COL_WEAKPOINT_WP_ICE = "weakpoint_ice";
	public static final String	DB_COL_WEAKPOINT_WP_DRAGON = "weakpoint_dragon";
	public static final String	DB_COL_WEAKPOINT_WRITER_ID = "writer";
	public static final String	DB_COL_WEAKPOINT_ARMY_ZAN = "army_zan";
	public static final String	DB_COL_WEAKPOINT_ARMY_DA = "army_da";
	public static final String	DB_COL_WEAKPOINT_ARMY_DAN = "army_dan";
	public static final String	DB_COL_WEAKPOINT_PARTS_1 = "parts_one";
	public static final String	DB_COL_WEAKPOINT_PARTS_2 = "parts_two";
	public static final String	DB_COL_WEAKPOINT_PARTS_3 = "parts_three";
	public static final String	DB_COL_WEAKPOINT_PARTS_4 = "parts_four";
	public static final String	DB_COL_WEAKPOINT_STAT_POISON = "stat_poison";
	public static final String	DB_COL_WEAKPOINT_STAT_PARALYSIS = "stat_paralysis";
	public static final String	DB_COL_WEAKPOINT_STAT_SLEEP = "stat_sleep";
	public static final String	DB_COL_WEAKPOINT_STAT_FAINT = "stat_faint";
	public static final String	DB_COL_WEAKPOINT_TRAP_PITFALL = "trap_pitfall";
	public static final String	DB_COL_WEAKPOINT_TRAP_ELECT = "trap_elect";
	public static final String	DB_COL_WEAKPOINT_TRAP_FLASHBALL = "trap_flashball";
	public static final String	DB_COL_WEAKPOINT_TRAP_FERTIRIZINGBALL = "trap_fertirizingball";
	public static final String	DB_COL_WEAKPOINT_TRAP_SONIC = "trap_sonic";
	public static final String	DB_COL_WEAKPOINT_TRAP_MEAT = "trap_meat";
	public static final String	DB_COL_WEAKPOINT_SP_LOUD = "sp_loud";
	public static final String	DB_COL_WEAKPOINT_SP_WIND = "sp_wind";
	public static final String	DB_COL_KIND_ID = "kind_id";
	public static final String	DB_COL_KIND_NAME = "kind_name";
	public static final String	DB_COL_WRITER_ID = "writer_id";
	public static final String	DB_COL_WRITER_NAME = "writer_name";
	public static final String	DB_COL_WRITER_URL = "writer_url";
	public static final String	DB_COL_MONSTER_NO = "monster_no";
	public static final String	DB_COL_MONSTER_ID = "monster_id";
	public static final String	DB_COL_MONSTER_WRITER_ID = "monster_writer_id";
	public static final String	DB_COL_MONSTER_IMAGE_NAME = "monster_image_name";
	public static final String	DB_COL_USER_MONSTER_ID = "user_monster_id";
	public static final String	DB_COL_USER_IMG = "user_image";
	// クエリ
	public static final String	DB_QUERY_SELECT_ALL_WEAKPOINT =
		"select Distinct " +
					DB_COL_WEAKPOINT_ID + ", " + DB_COL_USER_IMG + ", " +
					DB_COL_WEAKPOINT_MONS_NAME + ", " + DB_COL_WEAKPOINT_MONS_WEAK + ", " +
					DB_COL_WEAKPOINT_MONS_KIND + ", " + DB_COL_WEAKPOINT_WP_FIRE + ", " +
					DB_COL_WEAKPOINT_WP_WATER + ", " + DB_COL_WEAKPOINT_WP_THUNDER + ", " +
					DB_COL_WEAKPOINT_WP_ICE + ", " + DB_COL_WEAKPOINT_WP_DRAGON + ", " +
					DB_COL_KIND_NAME + ", " + DB_COL_WRITER_NAME + ", " + 
					DB_COL_WRITER_URL + ", " + DB_COL_WEAKPOINT_ARMY_ZAN + ", " +
					DB_COL_WEAKPOINT_ARMY_DA + ", " + DB_COL_WEAKPOINT_ARMY_DAN + ", " +
					DB_COL_WEAKPOINT_PARTS_1 + ", " + DB_COL_WEAKPOINT_PARTS_2 + ", " + 
					DB_COL_WEAKPOINT_PARTS_3 + ", " + DB_COL_WEAKPOINT_PARTS_4 + ", " +
					DB_COL_WEAKPOINT_STAT_POISON + ", " + DB_COL_WEAKPOINT_STAT_PARALYSIS + ", " + 
					DB_COL_WEAKPOINT_STAT_SLEEP + ", " + DB_COL_WEAKPOINT_STAT_FAINT + ", " +
					DB_COL_WEAKPOINT_TRAP_PITFALL + ", " + DB_COL_WEAKPOINT_TRAP_ELECT + ", " +
					DB_COL_WEAKPOINT_TRAP_FLASHBALL + ", " + DB_COL_WEAKPOINT_TRAP_FERTIRIZINGBALL + ", " +
					DB_COL_WEAKPOINT_TRAP_SONIC + ", " + DB_COL_WEAKPOINT_TRAP_MEAT + ", " +
					DB_COL_WEAKPOINT_SP_LOUD + ", " + DB_COL_WEAKPOINT_SP_WIND + 
		" from " + DB_TBL_NAME + ", " + DB_KIND_TBL_NAME + ", " + DB_WRITER_TBL_NAME + ", " + DB_USER_TBL_NAME + 
		" left join " + DB_MONSTER_TBL_NAME + " on " + DB_COL_WEAKPOINT_ID + " = " + DB_COL_MONSTER_ID + "-1 " +
		" where " + DB_COL_WEAKPOINT_MONS_KIND + " = " + DB_COL_KIND_ID +
		" and " + DB_COL_WEAKPOINT_WRITER_ID + " = " + DB_COL_WRITER_ID +
		" and " + DB_COL_WEAKPOINT_ID + " = " + DB_COL_USER_MONSTER_ID;
	public static final String	DB_QUERY_SELECT_01_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'ア%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'イ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ウ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'エ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'オ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_02_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'カ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'キ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ク%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ケ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'コ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ガ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ギ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'グ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ゲ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ゴ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_03_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'サ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'シ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ス%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'セ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ソ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ザ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ジ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ズ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ゼ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ゾ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_04_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'タ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'チ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ツ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'テ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ト%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ダ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ヂ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ヅ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'デ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ド%\'" +
		")";
	public static final String	DB_QUERY_SELECT_05_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'ナ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ニ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ヌ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ネ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ノ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_06_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'ハ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ヒ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'フ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ヘ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ホ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'バ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ビ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ブ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ベ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ボ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'パ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ピ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'プ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ペ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ポ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_07_WEAKPOINT =
		" and (" + DB_COL_WEAKPOINT_MONS_NAME + " like \'ラ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'リ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ル%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'レ%\'" +
		" or " + DB_COL_WEAKPOINT_MONS_NAME + " like \'ロ%\'" +
		")";
	public static final String	DB_QUERY_SELECT_WEAKPOINT[] = {
		"",
		DB_QUERY_SELECT_01_WEAKPOINT,
		DB_QUERY_SELECT_02_WEAKPOINT,
		DB_QUERY_SELECT_03_WEAKPOINT,
		DB_QUERY_SELECT_04_WEAKPOINT,
		DB_QUERY_SELECT_05_WEAKPOINT,
		DB_QUERY_SELECT_06_WEAKPOINT,
		DB_QUERY_SELECT_07_WEAKPOINT
	};
	//**********************定数定義**********************

    // 設定情報
    //public Preferences_Setting m_csSetting;
	public Context mContext;
	
	// 弱点早見表用変数
	public int m_nSumRowNum=0;
	public int[] m_nWeakpointIds;
	public String[] m_strImgNames;
	public String[] m_strMonsterName;	
	public String[] m_strMonsterKind;
	public int[] m_nMonsterKind;
	public String[] m_strWeakPoint;
	public int[][] m_nWeakPoint;
	public String[] m_strWriterName;
	public String[] m_strWriterURL;
	public String[] m_strArmyZan;
	public String[] m_strArmyDa;
	public String[] m_strArmyDan;
	public String[][] m_strParts;
	public int[][] m_nStats;

	// モンスター情報用変数
	public int m_nSumRowNumForMonster = 0;
	public int[] m_nMonsterIds;
	public int[] m_nMonsterWriterIds;
	public String[] m_strMonsterImgNames;
	public String[] m_strMonsterWriterName;
	public String[] m_strMonsterWriterUrl;
	
	public boolean m_bUpdateFlag = false; 
	
	// コンストラクタ
	public DB_WeakPointGallery(Context context) {
		super(context, DB_NAME, DB_VER);
	    // DBアクセスクラス生成
		//m_csDBSql = new DB_BaseOperater(context, DB_NAME_MISSION, DB_VER_MISSION);
        // セッティング情報を準備
        //m_csSetting = new Preferences_Setting(context);
		mContext = context;
	}
	
	// ＤＢからデータ取得して内部でセット
	public boolean StartDB()
	{
		SetDB(0, 0);
        
        return true;
	}
	
	/*****************************************
	 *  絞込みのデータを取得
	 ****************************************/
    public boolean SetDB(int nKind, int nNum)
    {
    	int nWeakpointIndex = nNum;
		Cursor csCur;
		// ＤＢからデータの取得
		try{
			String strWhere = "";
			// モンスター種別がセットされていたら絞込み用の条件追加
			if( nKind > 0 ){
				strWhere  = " and " + DB_COL_WEAKPOINT_MONS_KIND + " = " + nKind + " ";
			}
			strWhere += DB_QUERY_SELECT_WEAKPOINT[nWeakpointIndex];
			String strQuery = String.format( "%s %s",
											 DB_QUERY_SELECT_ALL_WEAKPOINT,
											 strWhere );
	    	csCur = readDB(strQuery);			
		}catch(Exception e){
			// 例外時は何もしない
			return false;
		}
		
    	m_nSumRowNum = csCur.getCount();
    	m_nWeakpointIds = new int[m_nSumRowNum];
    	m_strImgNames = new String[m_nSumRowNum];
    	m_strMonsterName = new String[m_nSumRowNum];
    	m_strMonsterKind = new String[m_nSumRowNum];
    	m_nMonsterKind = new int[m_nSumRowNum];
    	m_strWeakPoint = new String[m_nSumRowNum];
    	m_nWeakPoint = new int[m_nSumRowNum][5];
    	m_strWriterName = new String[m_nSumRowNum];
    	m_strWriterURL = new String[m_nSumRowNum];
    	m_strArmyZan = new String[m_nSumRowNum];
    	m_strArmyDa = new String[m_nSumRowNum];
    	m_strArmyDan = new String[m_nSumRowNum];
    	m_strParts = new String[m_nSumRowNum][4];
    	m_nStats = new int[m_nSumRowNum][12];
    	
    	// ガーベジコレクション
    	java.lang.System.gc();

    	// カーソルを使ってメンバ変数にデータをセット
        csCur.moveToFirst();
        for(int nIndex=0; nIndex<m_nSumRowNum; nIndex++){
        	m_nWeakpointIds[nIndex] = csCur.getInt(0);
        	m_strImgNames[nIndex] = GetImageNameFromImageID(csCur.getInt(1));
        	m_strMonsterName[nIndex] = csCur.getString(2); 
        	m_strWeakPoint[nIndex] = csCur.getString(3);
        	m_nMonsterKind[nIndex] = csCur.getInt(4); 
        	m_nWeakPoint[nIndex][0] = csCur.getInt(5);
        	m_nWeakPoint[nIndex][1] = csCur.getInt(6);
        	m_nWeakPoint[nIndex][2] = csCur.getInt(7);
        	m_nWeakPoint[nIndex][3] = csCur.getInt(8);
        	m_nWeakPoint[nIndex][4] = csCur.getInt(9);
        	m_strMonsterKind[nIndex] = csCur.getString(10); 
        	m_strWriterName[nIndex] = csCur.getString(11);
        	m_strWriterURL[nIndex] = csCur.getString(12);
        	m_strArmyZan[nIndex] = csCur.getString(13);
        	m_strArmyDa[nIndex] = csCur.getString(14);
        	m_strArmyDan[nIndex] = csCur.getString(15);
        	m_strParts[nIndex][0] = csCur.getString(16);
        	m_strParts[nIndex][1] = csCur.getString(17);
        	m_strParts[nIndex][2] = csCur.getString(18);
        	m_strParts[nIndex][3] = csCur.getString(19);
        	m_nStats[nIndex][0] = csCur.getInt(20);
        	m_nStats[nIndex][1] = csCur.getInt(21);
        	m_nStats[nIndex][2] = csCur.getInt(22);
        	m_nStats[nIndex][3] = csCur.getInt(23);
        	m_nStats[nIndex][4] = csCur.getInt(24);
        	m_nStats[nIndex][5] = csCur.getInt(25);
        	m_nStats[nIndex][6] = csCur.getInt(26);
        	m_nStats[nIndex][7] = csCur.getInt(27);
        	m_nStats[nIndex][8] = csCur.getInt(28);
        	m_nStats[nIndex][9] = csCur.getInt(29);
        	m_nStats[nIndex][10] = csCur.getInt(30);
        	m_nStats[nIndex][11] = csCur.getInt(31);
       	csCur.moveToNext();
        }
        csCur.close();
        
        return true;
    }

	/*****************************************
	 *  絞込みのデータを取得（クエストから呼び出し時）
	 ****************************************/
    public boolean SetDBFromQuest(int nMID)
    {
		Cursor csCur;
		// ＤＢからデータの取得
		try{
			String strWhere = " and " + DB_COL_WEAKPOINT_ID + " = " + nMID + " ";
			String strQuery = String.format( "%s %s",
											 DB_QUERY_SELECT_ALL_WEAKPOINT,
											 strWhere );
	    	csCur = readDB(strQuery);			
		}catch(Exception e){
			// 例外時は何もしない
			return false;
		}
		
    	m_nSumRowNum = csCur.getCount();
    	m_nWeakpointIds = new int[m_nSumRowNum];
    	m_strImgNames = new String[m_nSumRowNum];
    	m_strMonsterName = new String[m_nSumRowNum];
    	m_strMonsterKind = new String[m_nSumRowNum];
    	m_nMonsterKind = new int[m_nSumRowNum];
    	m_strWeakPoint = new String[m_nSumRowNum];
    	m_nWeakPoint = new int[m_nSumRowNum][5];
    	m_strWriterName = new String[m_nSumRowNum];
    	m_strWriterURL = new String[m_nSumRowNum];
    	m_strArmyZan = new String[m_nSumRowNum];
    	m_strArmyDa = new String[m_nSumRowNum];
    	m_strArmyDan = new String[m_nSumRowNum];
    	m_strParts = new String[m_nSumRowNum][4];
    	m_nStats = new int[m_nSumRowNum][12];
    	
    	// ガーベジコレクション
    	java.lang.System.gc();

    	// カーソルを使ってメンバ変数にデータをセット
        csCur.moveToFirst();
        for(int nIndex=0; nIndex<m_nSumRowNum; nIndex++){
        	m_nWeakpointIds[nIndex] = csCur.getInt(0);
        	m_strImgNames[nIndex] = GetImageNameFromImageID(csCur.getInt(1));
        	m_strMonsterName[nIndex] = csCur.getString(2); 
        	m_strWeakPoint[nIndex] = csCur.getString(3);
        	m_nMonsterKind[nIndex] = csCur.getInt(4); 
        	m_nWeakPoint[nIndex][0] = csCur.getInt(5);
        	m_nWeakPoint[nIndex][1] = csCur.getInt(6);
        	m_nWeakPoint[nIndex][2] = csCur.getInt(7);
        	m_nWeakPoint[nIndex][3] = csCur.getInt(8);
        	m_nWeakPoint[nIndex][4] = csCur.getInt(9);
        	m_strMonsterKind[nIndex] = csCur.getString(10); 
        	m_strWriterName[nIndex] = csCur.getString(11);
        	m_strWriterURL[nIndex] = csCur.getString(12);
        	m_strArmyZan[nIndex] = csCur.getString(13);
        	m_strArmyDa[nIndex] = csCur.getString(14);
        	m_strArmyDan[nIndex] = csCur.getString(15);
        	m_strParts[nIndex][0] = csCur.getString(16);
        	m_strParts[nIndex][1] = csCur.getString(17);
        	m_strParts[nIndex][2] = csCur.getString(18);
        	m_strParts[nIndex][3] = csCur.getString(19);
        	m_nStats[nIndex][0] = csCur.getInt(20);
        	m_nStats[nIndex][1] = csCur.getInt(21);
        	m_nStats[nIndex][2] = csCur.getInt(22);
        	m_nStats[nIndex][3] = csCur.getInt(23);
        	m_nStats[nIndex][4] = csCur.getInt(24);
        	m_nStats[nIndex][5] = csCur.getInt(25);
        	m_nStats[nIndex][6] = csCur.getInt(26);
        	m_nStats[nIndex][7] = csCur.getInt(27);
        	m_nStats[nIndex][8] = csCur.getInt(28);
        	m_nStats[nIndex][9] = csCur.getInt(29);
        	m_nStats[nIndex][10] = csCur.getInt(30);
        	m_nStats[nIndex][11] = csCur.getInt(31);
        	csCur.moveToNext();
        }
        csCur.close();
        
        return true;
    }

	/*****************************************
	 *  絞込みのデータを取得
	 ****************************************/
    public boolean SetMonsterDB(int nID)
    {
 		Cursor csCur;
		// ＤＢからデータの取得
		try{
			String strWhere = "";
			if( 0 <= nID ){
				strWhere = "where " + DB_COL_MONSTER_ID + " = " + nID;
			}
			// モンスター種別がセットされていたら絞込み用の条件追加
			String strQuery = String.format( "select * from %s %s",
					 DB_MONSTER_TBL_NAME,
					 strWhere );
	    	csCur = readDB(strQuery);
		}catch(Exception e){
			// 例外時は何もしない
			return false;
		}
		
    	m_nSumRowNumForMonster = csCur.getCount();
    	m_nMonsterIds = new int[m_nSumRowNumForMonster];
    	m_nMonsterWriterIds = new int[m_nSumRowNumForMonster];
    	m_strMonsterImgNames = new String[m_nSumRowNumForMonster];
    	
    	// ガーベジコレクション
    	java.lang.System.gc();

    	// カーソルを使ってメンバ変数にデータをセット
        csCur.moveToFirst();
        for(int nIndex=0; nIndex<m_nSumRowNumForMonster; nIndex++)
        {
        	m_nMonsterIds[nIndex] = csCur.getInt(1);
        	m_nMonsterWriterIds[nIndex] = csCur.getInt(2);
        	m_strMonsterImgNames[nIndex] = csCur.getString(3);
        	csCur.moveToNext();
        }
        csCur.close();
        
        return true;
    }

	/*****************************************
	 *  絞込みのデータを取得
	 ****************************************/
    public boolean SetWriterDB(String nImgName)
    {
 		Cursor csCur;
    	m_strMonsterWriterName = new String[1];
    	m_strMonsterWriterUrl = new String[1];
    	
		// ＤＢからデータの取得
		try{
			String strWhere = "where " + DB_COL_MONSTER_IMAGE_NAME + " = '" + nImgName + "'" +
							  " and " + DB_COL_MONSTER_WRITER_ID + " = " + DB_COL_WRITER_ID;
			// モンスター種別がセットされていたら絞込み用の条件追加
			String strQuery = String.format(
					 "select Distinct %s, %s from %s, %s %s",
					 DB_COL_WRITER_NAME,
					 DB_COL_WRITER_URL,
					 DB_MONSTER_TBL_NAME,
					 DB_WRITER_TBL_NAME,
					 strWhere );
	    	csCur = readDB(strQuery);
		}catch(Exception e){
			// 例外時は何もしない
        	m_strMonsterWriterName[0] = m_stStrWriterURL[0][0];
        	m_strMonsterWriterUrl[0] = m_stStrWriterURL[0][1];
			return false;
		}
		
    	int nSumNum= csCur.getCount();
    	// ガーベジコレクション
    	java.lang.System.gc();

    	// カーソルを使ってメンバ変数にデータをセット
        csCur.moveToFirst();
        if(0 < nSumNum){
        	m_strMonsterWriterName[0] = csCur.getString(0);
        	m_strMonsterWriterUrl[0] = csCur.getString(1);
        }else{
        	m_strMonsterWriterName[0] = m_stStrWriterURL[0][0];
        	m_strMonsterWriterUrl[0] = m_stStrWriterURL[0][1];
        }
        csCur.close();
        
        return true;
    }
    
	/*****************************************
	 *  絞込みのデータを取得
	 ****************************************/
    public String GetUserMonsterImageIDFromDB(int nMonsterID)
    {
 		Cursor csCur;
		// ＤＢからデータの取得
		try{
			String strWhere = "where " + DB_COL_USER_MONSTER_ID + " = " + nMonsterID;
			// モンスター種別がセットされていたら絞込み用の条件追加
			String strQuery = String.format(
					 "select * from %s %s",
					 DB_USER_TBL_NAME,
					 strWhere );
	    	csCur = readDB(strQuery);
		}catch(Exception e){
			// 例外時は何もしない
			return "m_noimage";
		}
		
    	// カーソルを使ってメンバ変数にデータをセット
        csCur.moveToFirst();
        String strImageName = GetImageNameFromImageID(csCur.getInt(1));
        csCur.close();
        
        return strImageName;
    }
    
	/*****************************************
	 *  データ数を取得
	 ****************************************/
    public int GetDataNum(){
    	return m_nSumRowNum;
    }
	
	/*****************************************
	 *  テーブルＩＤを取得
	 ****************************************/
	public int GetWeakpointID(int nIndex)
	{
        return m_nWeakpointIds[nIndex];
    }
	
	/*****************************************
	 *  イメージＩＤを取得
	 ****************************************/
	public String GetImgName(int nIndex)
	{
        String nImgName = "m_noimage";
    	if(nIndex < GetDataNum()){
    		nImgName = m_strImgNames[nIndex];
    	}
        return nImgName;
	}
	
	/*****************************************
	 *  モンスター名を取得
	 ****************************************/
	public String GetMonsterName(int nIndex)
	{
		String strDesc = m_strMonsterName[nIndex];
		return strDesc;
	}
	
	/*****************************************
	 *  モンスターIDを取得
	 ****************************************/
	public int GetMonsterID(int nIndex)
	{
		return m_nMonsterIds[nIndex];
	}
	
	/*****************************************
	 *  弱点（文字列）を取得
	 ****************************************/
	public String GetWeakPointStr(int nIndex)
	{
		String strWP = m_strWeakPoint[nIndex];
		return strWP;
	}
	
	/*****************************************
	 *  モンスター種族（数値）を取得
	 ****************************************/
	public int GetMonsterKindNum(int nIndex)
	{
		int nKind = m_nMonsterKind[nIndex];
		return nKind;
	}

	/*****************************************
	 *  モンスター種族（文字列）を取得
	 ****************************************/
	public String GetMonsterKindStr(int nIndex)
	{
		String strKind = m_strMonsterKind[nIndex];
		return strKind;
	}
	
	/*****************************************
	 *  弱点（数値）を取得
	 ****************************************/
	public int GetMonsterWeakpointNum(int nIndex, int nWPKind)
	{
		int nWP = m_nWeakPoint[nIndex][nWPKind];
		return nWP;
	}

	/*****************************************
	 *  モンスター種族（文字列）を取得
	 ****************************************/
	public String GetWriterNameStr(int nIndex)
	{
		String strName = m_strWriterName[nIndex];
		return strName;
	}

	/*****************************************
	 *  モンスター種族（文字列）を取得
	 ****************************************/
	public String GetWriterURLStr(int nIndex)
	{
		String strURL = m_strWriterURL[nIndex];
		return strURL;
	}

	/*****************************************
	 *  肉質（斬）（文字列）を取得
	 ****************************************/
	public String GetArmyZanStr(int nIndex)
	{
		String strName = m_strArmyZan[nIndex];
		return strName;
	}

	/*****************************************
	 *  肉質（打）（文字列）を取得
	 ****************************************/
	public String GetArmyDaStr(int nIndex)
	{
		String strName = m_strArmyDa[nIndex];
		return strName;
	}

	/*****************************************
	 *  肉質（弾）（文字列）を取得
	 ****************************************/
	public String GetArmyDanStr(int nIndex)
	{
		String strName = m_strArmyDan[nIndex];
		return strName;
	}

	/*****************************************
	 *  部位破壊（文字列）を取得
	 ****************************************/
	public String GetPartsStr(int nIndex, int nCol)
	{
		String strName = m_strParts[nIndex][nCol];
		return strName;
	}
	
	/*****************************************
	 *  状態異常（数値）を取得
	 ****************************************/
	public int GetStatInt(int nIndex, int nCol)
	{
		int nInt = m_nStats[nIndex][nCol];
		return nInt;
	}
	
	/*****************************************
	 *  モンスター情報数（数値）を取得
	 ****************************************/
	public int GetMonsterNum()
	{
		return m_nSumRowNumForMonster;
	}
	
	/*****************************************
	 *  モンスター情報数（数値）を取得
	 ****************************************/
	public String GetMonsterImgName(int nIndex)
	{
		if(GetMonsterNum() > nIndex){
			return m_strMonsterImgNames[nIndex];
		}else{
			return "m_noimage";
		}
	}
	
    //データベースオブジェクトを取得する（データベースにアクセスするとDBがない場合は作成される。）  
	public void InitDB(){
		InitDBBase();//DB_Base
		StartDB();
	}
	
	// @Override onCreate
	@Override
	public void onCreate(SQLiteDatabase db)
	{
		InitAllTbl(db);
		
        // ユーザー用ﾓﾝｽﾀｰイメージ情報リストを作成
		// 【これはアップデートしない＝ユーザーが設定できるイメージ情報なので、書き込みは変更される度に行う】
        CreateTBLofWeakpointUser(db);
    }

	// @Override onUpgrade
	@Override
	public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion)
	{
		//if(oldVersion <= DB_VER){
			DropAllTbl(db, oldVersion);
			InitAllTbl(db);
		//}
			
		try{
			CreateTBLofWeakpointUser(db);
		}catch(Exception e){
			;
		}
		
		////////////////////////////
		// 全バージョン共通処理
		
		// イメージ情報更新
		//for(int nIndex=0; nIndex<m_stnImageIds.length; nIndex++){
		//	UpdateMonsterImage(db, nIndex, m_stnImageIds[nIndex]);
		//}
		
		m_bUpdateFlag = true;
	}
	
	// ＤＢをすべて破棄します
	public void DropAllTbl(SQLiteDatabase db, int oldVersion)
	{
        String sql = "";  
        // 弱点テーブル削除
        try {
	        sql += "drop table " + DB_TBL_NAME;
	        db.execSQL(sql);
    	}catch(SQLException e){
    	}
        // モンスター種別テーブル削除
        if( 2 <= oldVersion ){
        	try {
		        sql = "";
		        sql += "drop table " + DB_KIND_TBL_NAME;
		        db.execSQL(sql);
        	}catch(SQLException e){
        	}
        }
        // 作者テーブル削除
        if( 5 <= oldVersion ){
        	try {
		        sql = "";
		        sql += "drop table " + DB_WRITER_TBL_NAME;
		        db.execSQL(sql);
        	}catch(SQLException e){
        	}
        }
        // モンスター情報テーブル削除
        //if( 19 <= oldVersion )
        {
        	try {
		        sql = "";
		        sql += "drop table " + DB_MONSTER_TBL_NAME;
		        db.execSQL(sql);
        	}catch(SQLException e){
        	}
        }
	}
	
	// ＤＢをすべて作成します
	public void InitAllTbl(SQLiteDatabase db)
	{
		// DBクリエイト
        String sql = String.format(
        		"create table %s(" +
        		"%s integer primary key, %s integer, " + 
        		"%s text not null, %s text not null, %s integer, " +
        		"%s integer, %s integer, %s integer, %s integer, %s integer, " +
        		"%s integer, %s text, %s text, %s text, " +
        		"%s text, %s text, %s text, %s text, " +
        		"%s integer, %s integer, %s integer, %s integer, " +
        		"%s integer, %s integer, %s integer, " +
        		"%s integer, %s integer, %s integer, " +
        		"%s integer, %s integer " +
        		")",
        		DB_TBL_NAME,
        		DB_COL_WEAKPOINT_ID, DB_COL_WEAKPOINT_IMG_NAME,
        		DB_COL_WEAKPOINT_MONS_NAME, DB_COL_WEAKPOINT_MONS_WEAK,
        		DB_COL_WEAKPOINT_MONS_KIND,
        		DB_COL_WEAKPOINT_WP_FIRE, DB_COL_WEAKPOINT_WP_WATER, DB_COL_WEAKPOINT_WP_THUNDER,
        		DB_COL_WEAKPOINT_WP_ICE, DB_COL_WEAKPOINT_WP_DRAGON,
        		DB_COL_WEAKPOINT_WRITER_ID,
        		DB_COL_WEAKPOINT_ARMY_ZAN, DB_COL_WEAKPOINT_ARMY_DA, DB_COL_WEAKPOINT_ARMY_DAN,
        		DB_COL_WEAKPOINT_PARTS_1, DB_COL_WEAKPOINT_PARTS_2,
        		DB_COL_WEAKPOINT_PARTS_3, DB_COL_WEAKPOINT_PARTS_4,
        		DB_COL_WEAKPOINT_STAT_POISON, DB_COL_WEAKPOINT_STAT_PARALYSIS, DB_COL_WEAKPOINT_STAT_SLEEP, DB_COL_WEAKPOINT_STAT_FAINT,
        		DB_COL_WEAKPOINT_TRAP_PITFALL, DB_COL_WEAKPOINT_TRAP_ELECT, DB_COL_WEAKPOINT_TRAP_FLASHBALL,
        		DB_COL_WEAKPOINT_TRAP_FERTIRIZINGBALL, DB_COL_WEAKPOINT_TRAP_SONIC, DB_COL_WEAKPOINT_TRAP_MEAT,
        		DB_COL_WEAKPOINT_SP_LOUD, DB_COL_WEAKPOINT_SP_WIND
        );
        db.execSQL(sql);

        // データ挿入
        String strImageName[] = mContext.getResources().getStringArray(R.array.m_stStrImages);
        for(int nIndex=0; nIndex<m_stnDefNum; nIndex++){
        	sql = "";
        	sql += "insert into " + DB_TBL_NAME + " ";
        	sql += "values ( ";
        	sql += "" + nIndex + ", ";
        	sql += "'" + strImageName[nIndex] + "', ";
        	sql += "'" + m_stStrDefMonsterName[nIndex] + "', ";
        	sql += "'" + m_stStrMonsterWeekPoint[nIndex] + "', ";
        	sql += "" + m_stIntMonsterKind[nIndex] + ", ";
        	sql += "" + m_stIntMonsterWeakpoint[nIndex][0] + ", ";
        	sql += "" + m_stIntMonsterWeakpoint[nIndex][1] + ", ";
        	sql += "" + m_stIntMonsterWeakpoint[nIndex][2] + ", ";
        	sql += "" + m_stIntMonsterWeakpoint[nIndex][3] + ", ";
        	sql += "" + m_stIntMonsterWeakpoint[nIndex][4] + ", ";
        	sql += "" + m_stnWriterID[nIndex] + ", ";
        	sql += "'" + m_stStrArmy[nIndex][0] + "', ";
        	sql += "'" + m_stStrArmy[nIndex][1] + "', ";
        	sql += "'" + m_stStrArmy[nIndex][2] + "', ";
        	sql += "'" + m_stStrParts[nIndex][0] + "', ";
        	sql += "'" + m_stStrParts[nIndex][1] + "', ";
        	sql += "'" + m_stStrParts[nIndex][2] + "', ";
        	sql += "'" + m_stStrParts[nIndex][3] + "', ";
        	sql += "" + m_stnStat[nIndex][0] + ", ";
        	sql += "" + m_stnStat[nIndex][1] + ", ";
        	sql += "" + m_stnStat[nIndex][2] + ", ";
        	sql += "" + m_stnStat[nIndex][3] + ", ";
        	sql += "" + m_stnStat[nIndex][4] + ", ";
        	sql += "" + m_stnStat[nIndex][5] + ", ";
        	sql += "" + m_stnStat[nIndex][6] + ", ";
        	sql += "" + m_stnStat[nIndex][7] + ", ";
        	sql += "" + m_stnStat[nIndex][8] + ", ";
        	sql += "" + m_stnStat[nIndex][9] + ", ";
        	sql += "" + m_stnStat[nIndex][10] + ", ";
        	sql += "" + m_stnStat[nIndex][11];
        	sql += ")";
            db.execSQL(sql);
        }
        
        // モンスター種別テーブルを作成
        CreateTBLofMonsterKind(db);
        
       	// 作者情報テーブルを作成
       	CreateTBLofWriter(db);
        
       	// モンスター情報テーブルを作成
        CreateTBLofMonster(db);
	}
	
	/*****************************************
	 *  ユーザー用モンスターイメージ情報テーブルを作成
	 ****************************************/
	public void CreateTBLofWeakpointUser(SQLiteDatabase db)
	{
        String sql = String.format(
        		"create table %s(" +
        		"%s integer primary key, %s integer " + 
        		")",
        		DB_USER_TBL_NAME,
        		DB_COL_USER_MONSTER_ID,
        		DB_COL_USER_IMG
        );
        db.execSQL(sql);

        // データ挿入
        String strImageName[] = mContext.getResources().getStringArray(R.array.m_stStrImages);
        for(int nIndex=0; nIndex<m_stnDefNum; nIndex++){
        	sql = "";
        	sql += "insert into " + DB_USER_TBL_NAME + " ";
        	sql += "values ( ";
        	sql += "" + nIndex + ", ";
        	sql += "" + GetImageIDFromImageName(strImageName[nIndex]) + " ";
        	sql += ")";
            db.execSQL(sql);
        }
	}

	/*****************************************
	 *  モンスター種別テーブルを作成
	 ****************************************/
	public void CreateTBLofMonsterKind(SQLiteDatabase db)
	{
		String sql;
		sql = "";
		sql += "create table " + DB_KIND_TBL_NAME;
		sql += "(";
		sql += " " + DB_COL_KIND_ID + " integer primary key, ";
		sql += " " + DB_COL_KIND_NAME + " text not null";
		sql += ")";
        db.execSQL(sql);
        // モンスター種別データ追加
        for(int nIndex=0; nIndex<m_stStrMonsterKind.length; nIndex++)
        {
        	int nNo = (nIndex+1);
        	sql = "";
        	sql += "insert into " + DB_KIND_TBL_NAME + " ";
        	sql += "values ( ";
        	sql += "" + nNo + ", ";
        	sql += "\'" + m_stStrMonsterKind[nIndex];
        	sql += "\')";
            db.execSQL(sql);
        }		
	}

	/*****************************************
	 *  作者テーブルを作成
	 ****************************************/
	public void CreateTBLofWriter(SQLiteDatabase db)
	{
		String sql;
		sql = "";
		sql += "create table " + DB_WRITER_TBL_NAME;
		sql += "(";
		sql += " " + DB_COL_WRITER_ID + " integer primary key, ";
		sql += " " + DB_COL_WRITER_NAME + " text not null, ";
		sql += " " + DB_COL_WRITER_URL + " text not null";
		sql += ")";
        db.execSQL(sql);
        // 作者データ追加
        for(int nIndex=0; nIndex<m_stStrWriterURL.length; nIndex++)
        {
        	int nNo = (nIndex+1);
        	sql = "";
        	sql += "insert into " + DB_WRITER_TBL_NAME + " ";
        	sql += "values ( ";
        	sql += "" + nNo + ", ";
        	sql += " \'" + m_stStrWriterURL[nIndex][0] + "\', ";
        	sql += " \'" + m_stStrWriterURL[nIndex][1] + "\' ";
        	sql += ")";
            db.execSQL(sql);
        }		
	}

	/*****************************************
	 *  モンスター情報テーブルを作成
	 ****************************************/
	public void CreateTBLofMonster(SQLiteDatabase db)
	{
		String sql;
		sql = "";
		sql += "create table " + DB_MONSTER_TBL_NAME;
		sql += "(";
		sql += " " + DB_COL_MONSTER_NO + " integer primary key, ";
		sql += " " + DB_COL_MONSTER_ID + " integer, ";
		sql += " " + DB_COL_MONSTER_WRITER_ID + " integer, ";
		sql += " " + DB_COL_MONSTER_IMAGE_NAME + " text";
		sql += ")";
        db.execSQL(sql);
        // 作者データ追加
        for(int nIndex=0; nIndex<m_stStrMonsterImgInfo.length; nIndex++)
        {
        	int nNo = (nIndex+1);
        	sql = "";
        	sql += "insert into " + DB_MONSTER_TBL_NAME + " ";
        	sql += "values ( ";
        	sql += "" + nNo + ", ";
        	sql += " " + Integer.valueOf(m_stStrMonsterImgInfo[nIndex][0]) + ", ";
        	sql += " " + Integer.valueOf(m_stStrMonsterImgInfo[nIndex][1]) + ", ";
        	sql += " '" + m_stStrMonsterImgInfo[nIndex][2] + "' ";
        	sql += ")";
            db.execSQL(sql);
        }		
	}

	// ユーザーデータを更新
	public void UpdateMonsterImageForUser(int nIndex, String strImageName)
	{
		String strWhere = DB_COL_USER_MONSTER_ID + " = " + nIndex;
		
		ContentValues cv = new ContentValues();
		cv.put(DB_COL_USER_IMG, "" + GetImageIDFromImageName(strImageName));

		// 書き込み
		writeDB(cv, DB_USER_TBL_NAME, strWhere);
	}
	
	// ユーザーデータをデフォルトに戻す
	public void DefaultUserTbl()
	{
    	try {
	        String sql = "";
	        sql += "drop table " + DB_USER_TBL_NAME;
	        m_csDB.execSQL(sql);
    	}catch(SQLException e){
    	}
    	CreateTBLofWeakpointUser(m_csDB);
	}
	
	////////////////////////////////////////////////////
	// ファイル名から対応するイメージＩＤを取得
	public int GetImageIDFromImageName(String strName)
	{
		int nImageID=m_nImageNumberNoimage;
		for(int nIndex=0; nIndex<m_strImageNumberMatchNames.length; nIndex++){
			if(m_strImageNumberMatchNames[nIndex].equals(strName)){
				nImageID = m_nImageNumberStart + nIndex;
			}
		}
		return nImageID;
	}
	////////////////////////////////////////////////////
	// イメージＩＤから対応するファイル名を取得
	public String GetImageNameFromImageID(int nImageID)
	{
		String strImageName="m_noimage";
		for(int nIndex=0; nIndex<m_strImageNumberMatchNames.length; nIndex++){
			if( nIndex+m_nImageNumberStart == nImageID ){
				strImageName = m_strImageNumberMatchNames[nIndex];
				break;
			}
		}
		return strImageName;
	}
	
	//////////////////////////////////////////////////////////////////////////
	//////////////////////////////////////////////////////////////////////////
	// ＤＢ上に入れるデフォルトの値
	
	public static final int m_stnDefNum = 45;
	
/*    private int[] m_stnImageIds={
    		// 1～10
            R.drawable.m_aoasira,
            R.drawable.m_akamu,
            R.drawable.m_agunakotoru,
            R.drawable.m_agunakotoru3,
            R.drawable.mm_005_agunakotoru,
            R.drawable.mm_006_agunakotoru,
            R.drawable.mm_014_amatugatuti,
            R.drawable.m_arubatorion,
            R.drawable.m_arubatorion,
            R.drawable.m_ibirujo,
            R.drawable.m_ukamurubasu,
            R.drawable.m_uragankin,
            R.drawable.mm_011_uragankin,
    		// 11～20
            R.drawable.mm_002_urukususu,
            R.drawable.mm_003_giginebura,
            R.drawable.mm_004_giginebura,
            R.drawable.m_kurupekko,
            R.drawable.mm_009_kurupekko,
            R.drawable.m_jienmoran,
            R.drawable.m_zinouga,
            R.drawable.m_dhiaburosu,
            R.drawable.mm_027_dhiaburosu,
            R.drawable.mm_025_thigarekkusu,
    		// 21～30
            R.drawable.mm_017_thigarekkusu,
            R.drawable.m_dosjagi,
            R.drawable.m_dosbagi,
            R.drawable.mm_018_dosfango,
            R.drawable.m_dosfrogi,
            R.drawable.m_noimage,
            R.drawable.m_narugakuruga,
            R.drawable.mm_020_naruga,
            R.drawable.m_hapurubokka,
            R.drawable.m_veriorosu,
    		// 31～40
            R.drawable.mm_010_veriorosu,
            R.drawable.mm_029_boruborosu,
            R.drawable.mm_024_boruborosu,
            R.drawable.mm_028_boruborosu,
            R.drawable.m_boruborosu,
            R.drawable.m_noimage,
            R.drawable.m_rioreia,
            R.drawable.m_rioreia2,
            R.drawable.m_rioreusu,
            R.drawable.m_rioreusu2,
            R.drawable.m_roarudorosu,
            R.drawable.mm_008_roarudorosu
    };
*/
    public static String[] m_stStrDefMonsterName = {
    		// 1～10(1-13)
    		"アオアシラ　　　　　 \n",
    		"アカムトルム　　　　\n",
    		"アグナコトル　　　　\n",
    		"アグナコトル(硬)　\n",
    		"アグナコトル亜種　　\n",
    		"アグナコトル亜種(硬)\n",
    		"アマツマガツチ　　　\n",
    		"アルバトリオン(赤黒)\n",
    		"アルバトリオン(青白)\n",
    		"イビルジョー　　　　\n",
    		"ウカムルバス　　　　\n",
    		"ウラガンキン　　　　\n",
    		"ウラガンキン亜種　　\n",
    		// 11～20(14-23)
    		"ウルクスス　　　　　\n",
    		"ギギネブラ　　　　　\n",
    		"ギギネブラ亜種　　　\n",
    		"クルペッコ　　　　　\n",
    		"クルペッコ亜種　　　\n",
    		"ジエン・モーラン　　\n",
    		"ジンオウガ　　　　　\n",
    		"ディアブロス　　　　\n",
    		"ディアブロス亜種　　\n",
    		"ティガレックス　　　\n",
    		// 21～30(24-33)
    		"ティガレックス亜種　\n",
    		"ドスジャギィ　　　　\n",
    		"ドスバギィ　　　　　\n",
    		"ドスファンゴ　　　　\n",
    		"ドスフロギィ　　　　\n",
    		"ドボルベルク　　　　\n",
    		"ナルガクルガ　　　　\n",
    		"ナルガクルガ亜種　　\n",
    		"ハプルボッカ　　　　\n",
    		"ベリオロス　　　　　\n",
    		// 31～40(34-45)
    		"ベリオロス亜種　　　\n",
    		"ボルボロス(泥無)　　\n",
    		"ボルボロス(泥付)　　\n",
    		"ボルボロス亜種(雪無)\n",
    		"ボルボロス亜種(雪付)\n",
    		"ラングロトラ　　　　\n",
    		"リオレイア　　　　　\n",
    		"リオレイア希少種　　\n",
    		"リオレウス　　　　　\n",
    		"リオレウス希少種　　\n",
    		"ロアルドロス　　　　\n",
    		"ロアルドロス亜種　　\n"
    };

    private String[] m_stStrMonsterWeekPoint = {
    		//火│水│雷│氷│龍
    		// 1～10
    		"火＞雷・氷　　　　　\n",
    		"龍＞雷　　　　　　　\n",
    		"龍・水＞氷　　　　　\n",
    		"龍・水＞氷　　　　　\n",
    		"龍・火＞雷　　　　　\n",
    		"龍・火＞雷　　　　　\n",
    		"龍＞火　　　　　　　\n",
    		"龍・火　　　　　　　\n",
    		"龍・火　　　　　　　\n",
    		"龍・雷　　　　　　　\n",
    		"火＞雷＞龍　　　　　\n",
    		"水＞龍＞氷　　　　　\n",
    		"水＞龍＞氷　　　　　\n",
    		// 11～20
    		"火＞雷　　　　　　　\n",
    		"火＞龍　　　　　　　\n",
    		"水＞龍　　　　　　　\n",
    		"氷＞水・雷　　　　　\n",
    		"氷＞火＞水　　　　　\n",
    		"氷・龍　　　　　　　\n",
    		"氷＞火・水　　　　　\n",
    		"氷＞水・雷・龍　　　\n",
    		"氷＞水・雷・龍　　　\n",
    		"雷＞水・龍　　　　　\n",
    		// 21～30
    		"水＞雷・龍　　　　　\n",
    		"火＞水・雷・氷　　　\n",
    		"火＞水・雷　　　　　\n",
    		"雷＞火・水　　　　　\n",
    		"氷＞水　　　　　　　\n",
    		"火＞雷・氷　　　　　\n",
    		"火・雷＞龍　　　　　\n",
    		"火・雷＞龍　　　　　\n",
    		"氷＞水・雷　　　　　\n",
    		"火・雷＞龍　　　　　\n",
    		// 31～40
    		"氷・雷　　　　　　　\n",
    		"氷　　　　　　　　　\n",
    		"氷　　　　　　　　　\n",
    		"火＞雷　　　　　　　\n",
    		"火＞雷　　　　　　　\n",
    		"水＞雷・氷　　　　　\n",
    		"龍＞雷　　　　　　　\n",
    		"雷＞水　　　　　　　\n",
    		"龍＞水・雷・氷　　　\n",
    		"雷＞水　　　　　　　\n",
    		"火＞雷・氷　　　　　\n",
    		"火＞雷　　　　　　　\n"
    };        

    // モンスター種別ＩＤ
    private int[] m_stIntMonsterKind = {
    		// 1～10
    		2,3,4,4,4,4,7,7,7,5,3,5,5,
    		// 11～20
    		2,3,3,1,1,7,6,3,3,3,
    		// 21～30
    		3,1,1,2,1,5,3,3,4,3,
    		// 31～40
    		3,5,5,5,5,2,3,3,3,3,4,4    		
    };

    // 弱点（☆～☆☆☆）
    private int[][] m_stIntMonsterWeakpoint = {
    		// 1～10
    		{3,0,3,2,0},
    		{0,0,3,0,3},
    		{0,3,2,2,3},
    		{1,3,1,2,0},//ADD 2011/01/23
    		{3,0,2,0,3},
    		{3,0,1,0,0},//ADD 2011/01/23
    		{2,0,1,1,3},
    		{0,1,0,2,0},
    		{2,1,0,0,3},//ADD 2011/01/23
    		{1,1,2,0,2},
    		{2,0,2,0,1},
    		{0,3,0,2,3},
    		{0,3,0,2,3},
    		// 11～20
    		{3,0,2,0,0},
    		{3,0,0,0,2},
    		{0,3,0,0,2},
    		{1,2,1,3,1},
    		{2,1,0,3,1},
    		{0,1,1,3,2},
    		{1,2,0,2,0},
    		{1,1,1,3,1},
    		{1,1,1,3,1},
    		{1,1,2,1,1},
    		// 21～30
    		{0,2,1,1,1},
    		{3,2,2,2,0},
    		{3,2,2,0,0},
    		{2,1,3,0,0},
    		{0,2,0,3,0},
    		{3,1,3,2,2},
    		{2,1,3,1,1},
    		{2,1,3,1,1},
    		{0,1,2,3,0},
    		{3,1,2,0,1},
    		// 31～40
    		{0,2,2,3,1},
    		{3,0,0,2,1},
    		{0,3,0,2,0},//Add 2011/01/23
    		{2,0,2,0,1},
    		{3,0,1,0,0},//Add 2011/01/23
    		{0,3,1,2,0},
    		{1,1,2,1,3},
    		{0,2,3,1,0},
    		{1,1,2,1,3},
    		{0,2,3,1,0},
    		{3,0,1,1,0},
    		{3,0,1,0,0}
    };
    
    // モンスター種別
    private String[] m_stStrMonsterKind = {
    	"鳥竜種",
    	"牙獣種",
    	"飛竜種",
    	"海竜種",
    	"獣竜種",
    	"牙竜種",
    	"古龍種"
    };
    
    // 作者情報
    private String[][] m_stStrWriterURL = {
    		// 1-5
	    	{"k0j1", "http://www.takahara-books.com/"},
	    	{"永くら 様", "http://nao32.blog103.fc2.com/"},
	    	{"すだお 様", "http://www.pixiv.net/member.php?id=560927"},
	    	{"蝙蝠 様", "http://www.pixiv.net/member.php?id=797572"},
	    	{"魚臭い 様", "http://blog.goo.ne.jp/oekakigasuki"},
    		// 6-10
	    	{"桧葉 様", "http://www.pixiv.net/member.php?id=596531"},
	    	{"peki 様", "http://www.pixiv.net/member.php?id=1649995"},
	    	{"ばん 様", "http://www.pixiv.net/member.php?id=1129876"},
	    	{"おるとろ 様", "http://www13.oekakibbs.com/bbs/oltlo2/oekakibbs.cgi"},
	    	{"nidoro　様", "http://www.pixiv.net/member.php?id=10104"},
    		// 11-15
	    	{"ヨウイチ 様", "http://www.geocities.jp/sohh_666/"},
	    	{"pixy 様", "http://www.pixiv.net/member.php?id=255662"},
	    	{"騒音狩人 様","http://www.pixiv.net/member.php?id=57122"},
	    	{"ミチオ 様","http://www.pixiv.net/member.php?id=509897"},
	    	{"デュレイド 様", "http://www.pixiv.net/member.php?id=2350945"},
	    	// 16-20
	    	{"アヤツバサ 様","http://www.pixiv.net/member.php?id=2509611"},
	    	{"えみゅー 様","http://www.pixiv.net/member.php?id=681574"},
	    	{"四電 ヒロ 様","http://www.pixiv.net/member.php?id=37191"},
	    	{"ごぶりん♪ 様","http://www.pixiv.net/member.php?id=1843653"},
	    	{"もい 様","http://www.pixiv.net/member.php?id=2976836"},
    		// 21-25
	    	{"thyr 様","http://www.pixiv.net/member.php?id=553878"},
	    	{"ツバクロウ＠モンス愛 様","http://www.pixiv.net/member.php?id=1301136"}
    };
    
    // 作者ＩＤ
    private int[] m_stnWriterID = {
    		//  1～10
        	3,5,8,9,13,5,6,12,12,5,7,5,5,
    		// 11～20
        	4,13,14,3,3,5,3,1,1,5,
    		// 21～30
        	5,3,3,3,3,1,2,3,4,5,
    		// 31～40
        	5,5,5,5,5,1,8,5,2,5,5,5
    };
	
    // 肉質
    private String[][] m_stStrArmy = {
    		// 1～10
    		{"尻　","尻　","上体"},
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"背　","背　","背　"},//ADD 2011/01/23
    		{"頭　","頭　","頭　"},
    		{"胸　","胸　","胸　"},//ADD 2011/01/23
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},//ADD 2011/01/23
    		{"頭<font color=red>腹</font>　","頭<font color=red>腹</font>　","頭<font color=red>腹</font>　"},
    		{"頭　","頭胸","頭　"},
    		{"頭腹","腹頭","腹　"},
    		{"頭腹","腹頭","腹　"},
    		// 11～20
    		{"尻　","尻　","頭　"},
    		{"腹　","頭 <font color=red>尾</font>　　","頭 <font color=red>尾</font>　　"},
    		{"腹　","頭 <font color=red>尾</font>　　","頭 <font color=red>尾</font>　　"},
    		{"頭　","頭　","音袋"},
    		{"頭　","頭　","音袋"},
    		{"口　","口　","口　"},
    		{"頭　","頭　","頭　"},
    		{"腹　","腹　","尾　"},
    		{"腹　","腹　","尾　"},
    		{"頭　","頭　","頭　"},
    		// 21～30
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"頭　","体　","頭　"},
    		{"コブ","コブ","コブ"},
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"口　","口　","口　"},
    		{"頭　","頭　","頭　"},
    		// 31～40
    		{"頭　","頭　","頭　"},
    		{"腕　","腕　","腕尾　"},
    		{"腕　","腕　","腕尾　"},//Add 2011/01/23
    		{"腕　","胴腕","尾　"},
    		{"腕　","胴腕","尾　"},//Add 2011/01/23
    		{"頭　","頭　","頭　"},
    		{"頭　","頭　","頭　"},
    		{"背　","背　","足　"},
    		{"頭　","頭　","頭　"},
    		{"背　","背　","足　"},
    		{"腹　","頭　","頭　"},
    		{"腹　","頭　","頭　"}
    };
    
    // 部位破壊
    private String[][] m_stStrParts = {
    		// 1～10
    		{"腕甲\t\t",		"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"牙(2回)\t",	"腹部 前脚",		"背中\t\t ",		"尻尾\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"胸殻 背ﾋﾚ",		"爪\t\t\t",		"尻尾\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"胸殻 背ﾋﾚ",		"爪\t\t\t",		"尻尾\t\t"},//ADD 2011/01/23
    		{"ｸﾁﾊﾞｼ\t\t",	"爪\t\t\t",		"背ﾋﾚ\t\t",		"尻尾\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"爪\t\t\t",		"背ﾋﾚ\t\t",		"尻尾\t\t"},//ADD 2011/01/23
    		{"頭(2回)\t",	"背中\t\t",		"右腕 左腕",		"尻尾\t\t"},
    		{"角(2回)\t",	"翼\t\t\t",		"脚\t\t\t",		"尻尾\t\t"},
    		{"角(2回)\t",	"翼\t\t\t",		"脚\t\t\t",		"尻尾\t\t"},//ADD 2011/01/23
    		{"頭(2回)\t",	"尻尾\t\t",		"\t\t\t",		"\t\t\t"},
    		{"ｱｺﾞ\t\t",		"腹部 前脚",		"背中\t\t",		"尻尾\t\t"},
    		{"ｱｺﾞ\t\t",		"尻尾(2回)",		"\t\t\t",		"\t\t\t"},
    		{"ｱｺﾞ\t\t",		"尻尾(2回)",		"\t\t\t",		"\t\t\t"},
    		// 11～20
    		{"耳\t\t\t",		"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"頭部\t\t",		"腹部\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭部\t\t",		"腹部\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"火打石\t",		"\t\t\t",		"\t\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"電気石\t",		"\t\t\t",		"\t\t\t"},
    		{"牙x2\t\t",		"背中x2\t",		"両前足\t",		"\t\t\t"},
    		{"角\t\t\t",		"前脚\t\t",		"背中\t\t",		"尻尾\t\t"},
    		{"角x2\t\t",		"尻尾\t\t",		"\t\t\t",		"\t\t\t"},
    		{"角x2\t\t",		"尻尾\t\t",		"\t\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		// 21～30
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"ｴﾘﾏｷ\t\t",	"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"ﾄｻｶ\t\t",		"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"なし\t\t",		"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"ｸﾁﾊﾞｼ\t\t",	"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"角\t\t\t",		"ｺﾌﾞ\t\t",		"尻尾(2回)",		"\t\t\t"},
    		{"頭\t\t\t",		"刃翼\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"刃翼\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"口蓋垂 \t",	"エラ\t\t",		"爪\t\t\t",		"\t\t\t"},
    		{"牙\t\t\t",		"翼\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		// 31～40
    		{"牙\t\t\t",		"翼\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},//Add 2011/01/23
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"爪\t\t\t",		"尻尾\t\t",		"\t\t\t"},//Add 2011/01/23
    		{"上背\t\t",		"\t\t\t",		"\t\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"翼爪\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"翼爪\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"翼爪\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"頭\t\t\t",		"翼爪\t\t",		"尻尾\t\t",		"\t\t\t"},
    		{"五本角\t",		"海綿質\t",		"尻尾\t\t",		"\t\t\t"},
    		{"五本角\t",		"海綿質\t",		"尻尾\t\t",		"\t\t\t"}
    };
    
    // 状態異常
    public int[][] m_stnStat = {
    		// 1～10
    		{3,3,3,3, 2,2,2,2,1,2, 0,0},
    		{1,1,1,1, 0,0,2,1,1,0, 3,0},	
    		{2,2,2,2, 1,1,2,2,1,0, 1,0},	
    		{2,2,2,2, 1,1,2,2,1,0, 1,0},//ADD 2011/01/23	
    		{2,2,2,2, 1,1,2,2,1,0, 1,0},	
    		{2,2,2,2, 1,1,2,2,1,0, 1,0},//ADD 2011/01/23
    		{1,1,1,1, 0,0,2,0,0,0, 1,1},	
    		{1,1,1,2, 0,0,2,0,0,0, 2,2},
    		{1,1,1,2, 0,0,2,0,0,0, 2,2},//ADD 2011/01/23
    		{1,1,1,1, 2,2,2,2,0,2, 2,0},	
    		{1,1,1,1, 0,0,2,0,1,0, 3,0},	
    		{3,2,2,1, 2,2,2,2,0,0, 1,0},	
    		{3,1,2,1, 2,2,2,2,0,0, 1,0},
    		// 11～20
    		{3,1,1,2, 2,2,2,2,1,0, 0,0},
    		{1,2,2,2, 2,2,0,2,0,0, 2,1},
    		{2,1,2,2, 2,2,0,2,0,0, 2,1},
    		{2,2,2,3, 2,2,2,2,1,0, 0,1},
    		{2,2,2,3, 2,2,0,2,1,0, 1,1},
    		{0,0,0,0, 0,0,0,0,0,0, 2,0},
    		{2,1,1,2, 2,0,2,2,0,0, 1,1},
    		{2,2,3,2, 1,1,2,2,1,0, 2,1},
    		{2,2,3,2, 1,1,2,2,1,0, 2,1},
    		{2,2,2,1, 2,2,2,2,0,2, 3,1},
    		// 21～30
    		{2,2,2,1, 2,2,2,2,0,2, 3,1},
    		{3,3,3,3, 2,2,2,2,0,2, 0,0},
    		{3,3,1,3, 2,2,2,2,0,2, 0,0},
    		{3,2,3,2, 2,2,0,2,0,0, 0,0},
    		{1,3,3,3, 2,2,2,2,0,2, 0,0},
    		{2,2,2,2, 2,2,2,2,0,0, 2,0},
    		{2,1,1,1, 1,2,2,2,1,0, 1,1},
    		{2,1,1,1, 1,2,2,2,1,0, 1,1},
    		{2,1,1,1, 0,2,0,2,1,0, 0,0},
    		{1,1,1,2, 2,2,2,2,0,1, 1,0},
    		// 31～40
    		{1,1,1,2, 2,2,2,2,0,1, 1,0},
    		{2,2,2,3, 2,2,2,2,0,0, 1,0},
    		{2,2,2,3, 2,2,2,2,0,0, 1,0},//Add 2011/01/23
    		{2,1,1,3, 2,2,2,2,0,0, 1,0},
    		{2,1,1,3, 2,2,2,2,0,0, 1,0},//Add 2011/01/23
    		{3,2,2,3, 2,2,2,2,0,0, 0,0},
    		{2,2,2,2, 2,2,2,2,0,1, 1,1},
    		{2,2,2,2, 2,2,2,2,0,1, 1,1},
    		{2,2,2,2, 2,2,2,2,0,1, 1,1},
    		{2,2,2,2, 2,2,2,2,0,1, 1,1},
    		{2,2,2,2, 2,2,2,2,0,0, 0,0},
    		{1,1,1,1, 2,2,2,2,0,0, 0,0}
    };
    
    // ﾓﾝｽﾀｰイメージ情報テーブル
    public String[][] m_stStrMonsterImgInfo =
    {
    		// 1～13
            {"1", "3", "m_aoasira"},
            {"1", "20","mm_040_aoasira"},
            {"2", "5", "m_akamu"},
            {"3", "5", "m_agunakotoru"},
            {"3", "9", "m_agunakotoru2"},
            {"3", "8", "m_agunakotoru3"},
            {"3", "13","mm_001_agunakotoru4"},
            {"3", "20","mm_041_agunakotoru"},
            {"4", "5", "m_agunakotoru"},
            {"4", "9", "m_agunakotoru2"},
            {"4", "8", "m_agunakotoru3"},
            {"4", "13","mm_001_agunakotoru4"},
            {"4", "20","mm_041_agunakotoru"},
            {"5", "8", "mm_005_agunakotoru"},
            {"5", "9", "mm_006_agunakotoru"},
            {"5", "5", "mm_007_agunakotoru"},
            {"5", "5", "m_agunakotoru"},
            {"5", "9", "m_agunakotoru2"},
            {"5", "8", "m_agunakotoru3"},
            {"5", "13","mm_001_agunakotoru4"},
            {"5", "20","mm_041_agunakotoru"},
            {"6", "8", "mm_005_agunakotoru"},
            {"6", "9", "mm_006_agunakotoru"},
            {"6", "5", "mm_007_agunakotoru"},
            {"6", "5", "m_agunakotoru"},
            {"6", "9", "m_agunakotoru2"},
            {"6", "8", "m_agunakotoru3"},
            {"6", "13","mm_001_agunakotoru4"},
            {"6", "20","mm_041_agunakotoru"},
            {"7", "6", "m_amatumagatuti"},
            {"7", "16","mm_014_amatugatuti"},
            {"7", "16","mm_015_amatugatuti"},
            {"7", "17","mm_022_amatumagatuti"},
            {"7", "17","mm_023_amatumagatuti"},
            {"7", "20","mm_033_amatumagatuti"},
            {"7", "22","mm_048_amatumagatuti"},
            {"8", "12","m_arubatorion"},
            {"8", "22","mm_051_arubatorion"},
            {"9", "12","m_arubatorion"},
            {"9", "22","mm_051_arubatorion"},
            {"10", "5","m_ibirujo"},
            {"10","20","mm_042_ibirujo"},
            {"10","22","mm_049_ibirujo"},
            {"10","22","mm_050_ibirujo"},
            {"11", "7","m_ukamurubasu"},
            {"12", "5","m_uragankin"},
            {"13", "5","mm_011_uragankin"},
            {"13", "5","m_uragankin"},
    		// 14～23
            {"14", "4",  "mm_002_urukususu"},
            {"15", "13", "mm_003_giginebura"},
            {"15", "14", "mm_004_giginebura"},
            {"15", "22", "mm_045_giginebura"},
            {"16", "22", "mm_046_giginebura"},
            {"16", "13", "mm_003_giginebura"},
            {"16", "14", "mm_004_giginebura"},
            {"16", "22", "mm_045_giginebura"},
            {"17", "3",  "m_kurupekko"},
            {"17", "17", "mm_021_kurupekko"},
            {"17", "20", "mm_038_kurupekko"},
            {"18", "3",  "mm_009_kurupekko"},
            {"18", "3",  "m_kurupekko"},
            {"18", "17", "mm_021_kurupekko"},
            {"18", "20", "mm_038_kurupekko"},
            {"19", "5",  "m_jienmoran"},
            {"20", "3",  "m_zinouga"},
            {"20", "10", "m_zinouga2"},
            {"20", "11", "m_zinouga3"},
            {"20", "15", "mm_016_zinouga"},
            {"20", "20", "mm_034_jinouga"},
            {"20", "21", "mm_043_jinouga"},
            {"20", "22", "mm_047_jinouga"},
            {"21", "9",  "m_dhiaburosu"},
            {"21", "16", "mm_013_dhiaburosu"},
            {"21", "18", "mm_027_dhiaburosu"},
            {"22", "18", "mm_027_dhiaburosu"},
            {"22", "9",  "m_dhiaburosu"},
            {"22", "16", "mm_013_dhiaburosu"},
            {"23", "18", "mm_025_thigarekkusu"},
            {"23", "5",  "m_tigarekkusu"},
            {"23", "20", "mm_039_thigarekkusu"},
            {"23", "22","mm_049_ibirujo"},
            {"23", "22","mm_050_ibirujo"},
    		// 24～33
            {"24", "15","mm_017_thigarekkusu"},
            {"24", "18","mm_025_thigarekkusu"},
            {"24", "5", "m_tigarekkusu"},
            {"24", "20","mm_039_thigarekkusu"},
            {"24", "22","mm_049_ibirujo"},
            {"24", "22","mm_050_ibirujo"},
            {"25", "8", "mm_032_dosjagi"},
            {"25", "3", "m_dosjagi"},
            {"25", "20","mm_035_dosjagi"},
            {"26", "8", "mm_030_dosbagi"},
            {"26", "3", "m_dosbagi"},
            {"27", "3", "m_dosfango"},
            {"27", "8", "mm_018_dosfango"},
            {"28", "8", "mm_031_dosfrogi"},
            {"28", "3", "m_dosfrogi"},
            {"30", "2", "m_narugakuruga"},
            {"30", "3", "m_naruga2"},
            {"30", "2", "m_naruga3"},
            {"30", "16","mm_012_narugakuruga"},
            {"30", "20","mm_036_narugakuruga"},
            {"30", "22","mm_049_ibirujo"},
            {"30", "22","mm_050_ibirujo"},
            {"30", "21","mm_055_narugakuruga"},
            {"31", "17","mm_020_naruga"},
            {"31", "2", "m_narugakuruga"},
            {"31", "3", "m_naruga2"},
            {"31", "2", "m_naruga3"},
            {"31", "16","mm_012_narugakuruga"},
            {"31", "20","mm_036_narugakuruga"},
            {"31", "22","mm_049_ibirujo"},
            {"31", "22","mm_050_ibirujo"},
            {"31", "21","mm_055_narugakuruga"},
            {"32", "4", "m_hapurubokka"},
            {"32", "8", "mm_019_hapurubokka"},
            {"33", "5", "m_veriorosu"},
    		// 34～45
            {"34", "5",  "mm_010_veriorosu"},
            {"34", "5",  "m_veriorosu"},
            {"35", "19", "mm_029_boruborosu"},
            {"35", "10", "mm_024_boruborosu"},
            {"35", "18", "mm_028_boruborosu"},
            {"35", "5",  "m_boruborosu"},
            {"36", "10", "mm_024_boruborosu"},
            {"36", "19", "mm_029_boruborosu"},
            {"36", "18", "mm_028_boruborosu"},
            {"36", "5",  "m_boruborosu"},
            {"37", "18", "mm_028_boruborosu"},
            {"37", "10", "mm_024_boruborosu"},
            {"37", "19", "mm_029_boruborosu"},
            {"37", "5",  "m_boruborosu"},
            {"38", "5",  "m_boruborosu"},
            {"38", "10", "mm_024_boruborosu"},
            {"38", "19", "mm_029_boruborosu"},
            {"38", "18", "mm_028_boruborosu"},
            {"40", "8",  "m_rioreia"},
            {"40", "5",  "m_rioreia2"},
            {"40", "9",  "m_rioreia3"},
            {"40", "11", "m_rioreia4"},
            {"40", "18", "mm_026_rioreia"},
            {"40", "2",  "m_rioreiasu"},
            {"40", "21", "mm_052_rioreia"},
            {"40", "20", "mm_054_rioreia"},
            {"41", "8",  "m_rioreia"},
            {"41", "5",  "m_rioreia2"},
            {"41", "9",  "m_rioreia3"},
            {"41", "11", "m_rioreia4"},
            {"41", "18", "mm_026_rioreia"},
            {"41", "2",  "m_rioreiasu"},
            {"41", "21", "mm_052_rioreia"},
            {"41", "20", "mm_054_rioreia"},
            {"42", "2",  "m_rioreusu"},
            {"42", "5",  "m_rioreusu2"},
            {"42", "11", "m_rioreusu3"},
            {"42", "2",  "m_rioreusu4"},
            {"42", "2",  "m_rioreiasu"},
            {"42", "21", "mm_044_rioreusu"},
            {"42", "20", "mm_053_rioreusu"},
            {"43", "2",  "m_rioreusu"},
            {"43", "5",  "m_rioreusu2"},
            {"43", "11", "m_rioreusu3"},
            {"43", "2",  "m_rioreusu4"},
            {"43", "2",  "m_rioreiasu"},
            {"43", "21", "mm_044_rioreusu"},
            {"43", "20", "mm_053_rioreusu"},
            {"44", "5",  "m_roarudorosu"},
            {"44", "20", "mm_037_roarudorosu"},
            {"45", "5",  "mm_008_roarudorosu"},
            {"45", "5",  "m_roarudorosu"},
            {"45", "20", "mm_037_roarudorosu"}
    };
    
    public static final int m_nImageNumberStart = 0x7f020005;
    public static final int m_nImageNumberNoimage = 0x7f020005 + 20;
    
    public static final String m_strImageNumberMatchNames[] = {
            "m_agunakotoru",
            "m_agunakotoru2",
            "m_agunakotoru3",
            "m_akamu",
            "m_amatumagatuti",
            "m_aoasira",
            "m_arubatorion",
            "m_boruborosu",
            "m_dhiaburosu",
            "m_dosbagi",
            "m_dosfango",
            
            "m_dosfrogi",
            "m_dosjagi",
            "m_hapurubokka",
            "m_ibirujo",
            "m_jienmoran",
            "m_kurupekko",
            "m_naruga2",
            "m_naruga3",
            "m_narugakuruga",
            "m_noimage",
            
            "m_rioreia",
            "m_rioreia2",
            "m_rioreia3",
            "m_rioreia4",
            "m_rioreiasu",
            "m_rioreusu",
            "m_rioreusu2",
            "m_rioreusu3",
            "m_rioreusu4",
            "m_roarudorosu",
            "m_tigarekkusu",
            "m_ukamurubasu",
            "m_uragankin",
            "m_veriorosu",
            "m_zinouga",
            "m_zinouga2",
            "m_zinouga3",
            "mm_001_agunakotoru4",
            "mm_002_urukususu",
            "mm_003_giginebura",
            "mm_004_giginebura",
            "mm_005_agunakotoru",
            "mm_006_agunakotoru",
            "mm_007_agunakotoru",
            "mm_008_roarudorosu",
            "mm_009_kurupekko",
            "mm_010_veriorosu",
            "mm_011_uragankin",
            "mm_012_narugakuruga",
            "mm_013_dhiaburosu",
            "mm_014_amatugatuti",
            "mm_015_amatugatuti",
            "mm_016_zinouga",
            "mm_017_thigarekkusu",
            "mm_018_dosfango",
            "mm_019_hapurubokka",
            "mm_020_naruga",
            "mm_021_kurupekko",
            "mm_022_amatumagatuti",
            "mm_023_amatumagatuti",
            "mm_024_boruborosu",
            "mm_025_thigarekkusu",
            "mm_026_rioreia",
            "mm_027_dhiaburosu",
            "mm_028_boruborosu",
            "mm_029_boruborosu",		
            "mm_030_dosbagi",
            "mm_031_dosfrogi",		
            "mm_032_dosjagi",
            "mm_033_amatumagatuti",
            "mm_034_jinouga",
            "mm_035_dosjagi",
            "mm_036_narugakuruga",
            "mm_037_roarudorosu",
            "mm_038_kurupekko",
            "mm_039_thigarekkusu",
            "mm_040_aoasira",
            "mm_041_agunakotoru",
            "mm_042_ibirujo",
            "mm_043_jinouga",
            "mm_044_rioreusu",
            "mm_045_giginebura",
            "mm_046_giginebura",
            "mm_047_jinouga",
            "mm_048_amatumagatuti",
            "mm_049_ibirujo",
            "mm_050_ibirujo",
            "mm_051_arubatorion",
            "mm_052_rioreia",
            "mm_053_rioreusu",
            "mm_054_rioreia",
            "mm_055_narugakuruga"
    };
}
